package Object_5;

public class Student {
    private String name;
    private int ID;
    private double score;

    public Student(String name, int ID, double score) {
        this.name = name;
        this.ID = ID;
        this.score = score;
    }

    public int getID() {
        return ID;
    }

    public void setID(int ID) {
        this.ID = ID;
    }

    public double getScore() {
        return score;
    }

    public void setScore(double score) {
        this.score = score;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (!(obj instanceof Student)) {
            return false;
        }
        if(this == obj){
            return true;
        }
        Student student = (Student) obj;
        return this.score == ((Student) obj).score;

    }
}
